build: set XEN_BUILD_EFI earlier
authorAnthony PERARD <anthony.perard@citrix.com>
Fri, 28 Jan 2022 10:41:09 +0000 (11:41 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 28 Jan 2022 10:41:09 +0000 (11:41 +0100)
commit672f2198f4eb6b14cbbf4abb4e2d27af15578dad
tree2b77fc0c97040bab00dffaaebf643a289f4cf3d5
parent2a565f9b40db981a860574be26d86a8665e71c38
build: set XEN_BUILD_EFI earlier

We are going to need the variable XEN_BUILD_EFI earlier.

But a side effect of calculating the value of $(XEN_BUILD_EFI) is to
also to generate "efi/check.o" which is used for further checks.
Thus the whole chain that check for EFI support is moved to
"arch.mk".

Some other changes are made to avoid too much duplication:
    - $(efi-check): Used to avoid repeating "efi/check.*". We don't
      set it to the path to the source as it would be wrong as soon
      as we support out-of-tree build.
    - $(LD_PE_check_cmd): As it is called twice, with an updated
      $(EFI_LDFLAGS).

$(nr-fixups) is renamed to $(efi-nr-fixups) as the former might be
a bit too generic.

In order to avoid exporting MKRELOC, the variable is added to $(MAKE)
command line. The only modification needed is in target "build", the
modification target "$(TARGET)" will be needed with a following patch
"build: avoid re-executing the main Makefile by introducing build.mk".

We can now revert 24b0ce9a5da2, we don't need to override efi-y on
recursion anymore.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/Makefile
xen/arch/x86/Makefile
xen/arch/x86/arch.mk